package com.yykj.drup.server.service.feign.fallback;

import com.yykj.drup.server.service.feign.MessageCenterServerFeign;
import com.yykj.message.center.client.dto.DrugOrderMessageBodyDTO;
import com.yykj.message.center.client.dto.TDMQMessageSendResult;
import com.yykj.message.center.client.dto.pay.DrugOrderCancelMessageBodyDTO;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author zeng
 * @Date 2022/3/24
 */
@Slf4j
public class MessageCenterServerFeignFallBack implements MessageCenterServerFeign {

    @Override
    public TDMQMessageSendResult sendDrugOrderMessage(DrugOrderMessageBodyDTO messageBodyDTO) {
        log.error("服务调用失败 ：message-center-server.sendDrugOrderMessage()");
        throw new RuntimeException("服务调用失败 ：message-server");
    }

    @Override
    public TDMQMessageSendResult sendCancelDrugOrderMessage(DrugOrderCancelMessageBodyDTO messageBodyDTO) {
        log.error("服务调用失败 ：message-center-server.sendCancelDrugOrderMessage()");
        throw new RuntimeException("服务调用失败 ：message-server");
    }
}
